class UrlMappings {
	
	static mappings = {
		"/product" (controller: "product",parseRequest:true) {
			action = [GET:"list", POST: "create"]	
		}
		
		"/product/$id" (controller: "product",parseRequest:true) {
			action = [GET: "show", PUT:"update", DELETE:"delete"]	
		}
		
		"/categories" (controller: "categories",parseRequest:true) {
			action = [GET:"list", POST: "create"]	
		}
		
		"/categories/$id" (controller: "categories",parseRequest:true) {
			action = [GET: "show", PUT:"update", DELETE:"delete"]	
		}
		"/suppliers" (controller: "suppliers",parseRequest:true) {
			action = [GET:"list", POST: "create"]	
		}
		
		"/suppliers/$id" (controller: "suppliers",parseRequest:true) {
			action = [GET: "show", PUT:"update", DELETE:"delete"]	
		}
		
		"/" (controller: "root"){
			action = [GET: "show"]
		}
		"500"(view:'/error')
	}
}
